package org.example.day06;

public class TestStringBuffer {
    public static void main(String[] args) {
        StringBuffer sf = new StringBuffer("hello");
        sf.append(123);//追加内容,任何数据都可以追加;
        //在指定位置插入
        sf.insert(5,",");
        //删除一部分内容
        sf.deleteCharAt(0);
        sf.delete(1,4);
        System.out.println(sf.toString());
        System.out.println(sf);
        //通过toString,转成String

    }
}
